CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/hdrhtml-path.hxx.in
    ${CMAKE_CURRENT_BINARY_DIR}/hdrhtml-path.hxx @ONLY)

INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})

SET(FILES_H
${CMAKE_CURRENT_SOURCE_DIR}/hdrhtml.h)

SET(FILES_CPP
${CMAKE_CURRENT_SOURCE_DIR}/hdrhtml.cpp
${CMAKE_CURRENT_SOURCE_DIR}/pfsouthdrhtml.cpp)

INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})

ADD_LIBRARY(hdrhtml STATIC ${FILES_H} ${FILES_CPP})
TARGET_LINK_LIBRARIES(hdrhtml Qt5::Core Qt5::Gui)

SET(FILES_CLI_H
${CMAKE_CURRENT_SOURCE_DIR}/hdrhtml.h)

SET(FILES_CLI_CPP
${CMAKE_CURRENT_SOURCE_DIR}/hdrhtml.cpp
${CMAKE_CURRENT_SOURCE_DIR}/pfsouthdrhtml.cpp)

ADD_LIBRARY(hdrhtml-cli STATIC ${FILES_CLI_H} ${FILES_CLI_CPP})
TARGET_LINK_LIBRARIES(hdrhtml-cli Qt5::Core Qt5::Gui)

SET(FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE}
    ${FILES_CPP} ${FILES_H}
    ${FILES_CLI_CPP} ${FILES_CLI_H}
    PARENT_SCOPE)

SET(LUMINANCE_MODULES_GUI ${LUMINANCE_MODULES_GUI} hdrhtml  PARENT_SCOPE)
SET(LUMINANCE_MODULES_CLI ${LUMINANCE_MODULES_CLI} hdrhtml-cli PARENT_SCOPE)
